<?php
	require_once(realpath(dirname(__FILE__)) . "/Baseobj.class.php");
	require_once(realpath(dirname(__FILE__)) . "/Cache.class.php");
	require_once(realpath(dirname(__FILE__)) . "/Modulesdesc.class.php");
	require_once(realpath(dirname(__FILE__)) . "/CacheBase.class.php");
	require_once(realpath(dirname(__FILE__)) . "/../fonctions/divers.php");


	class PluginsClassiques extends Baseobj{

		var $nom_plugin;

		var $moduledesc;

		function __construct($nom=""){
			parent::__construct();

			$this->nom_plugin = $nom;

            $lang = isset($_SESSION['navig']->lang) ? $_SESSION['navig']->lang : 1;

			$this->modulesdesc = new Modulesdesc();
			$this->modulesdesc->charger($this->nom_plugin, $lang);
		}

		/* Compatibilité avec les anciens plugins */
		function PluginsClassiques($nom=""){
			parent::__construct();
			$this->nom_plugin = $nom;
		}

		function prerequis() {
			return true;
		}

		function init(){

		}

		function destroy(){

		}

		function getTitre(){
			return $this->modulesdesc->titre;
		}

		function getChapo(){
			return $this->modulesdesc->chapo;
		}

		function getDescription(){
			return $this->modulesdesc->description;
		}

		function ajout_desc($titre, $chapo, $description, $lang=1, $devise=""){

			ActionsModules::instance()->mise_a_jour_description($this->nom_plugin, $lang, $titre, $chapo, $description, $devise);
		}

		function demarrage(){}

		function inclusion(){}

		function pre(){}

		function action(){}

		function boucle($texte, $args){}

		function post(){}

		function apres(){}

		function avantcommande(){}

		function aprescommande(){}

		function mail(){}

		function avantclient(){}

		function apresclient(){}

		function statut($commande){}

		function confirmation($commande){}

		function modprod($ref){}

		function modrub($id){}

	}

?>